package Cursus.Listeners;

import javax.swing.border.*;
import java.awt.*;

public class EigenBorder implements Border {

    public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) {
        Color oldColor = g.getColor();
        g.setColor(Color.BLUE);
        g.drawRect(x+0, y+0, w-0-0-1, h-0-0-1);
        g.setColor(Color.RED);
        g.drawRect(x+1, y+1, w-1-1-1, h-1-1-1);
        g.drawRect(x+2, y+2, w-2-2-1, h-2-2-1);
        g.drawRect(x+3, y+3, w-3-3-1, h-3-3-1);
        g.drawRect(x+4, y+4, w-4-4-1, h-4-4-1);
        g.drawRect(x+5, y+5, w-5-5-1, h-5-5-1);
        g.setColor(Color.BLUE);
        g.drawRect(x+6, y+6, w-6-6-1, h-6-6-1);
        g.setColor(Color.BLACK);
        g.setFont(new Font("Dialog", Font.ITALIC, 8));
        g.drawString("Kevin VR", 7, 7);
        g.setColor(oldColor);
    }

    public Insets getBorderInsets(Component cmpnt) {
        return new Insets(4, 4, 4, 4);
    }

    public boolean isBorderOpaque() {
        return false;
    }

}